<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryRef" :inline="true">
      <el-form-item label="">
        <el-select v-model="queryParams.lineId" placeholder="线名" clearable style="width: 140px">
          <el-option v-for="dict in railwayNameobj" :key="dict.railwayName" :label="dict.railwayName" :value="dict.id" />
        </el-select>
      </el-form-item>
      <el-form-item label="" class="formitemcla">
        <el-input v-model="queryParams.startingMileage" placeholder="起点里程" clearable style="width: 140px">
          <template #suffix> km </template>
        </el-input>
      </el-form-item>
      <el-form-item label="~">
        <el-input v-model="queryParams.destinationMileage" placeholder="终点里程" clearable style="width: 140px">
          <template #suffix> km </template>
        </el-input>
      </el-form-item>
      <el-form-item label="">
        <el-input v-model="queryParams.bridgeId" placeholder="桥号" clearable style="width: 140px"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="getList" style="width: 90px">查询</el-button>
        <el-button @click="resetQuery" style="width: 90px">重置</el-button>
        <el-button type="primary" @click="handleQuery" style="width: 90px">导出</el-button>
        <el-button type="primary" @click="handleAdd" style="width: 90px">新增</el-button>
      </el-form-item>
    </el-form>
    <!-- 表格数据 -->
    <el-table v-loading="loading" :data="railList" height="62vh" border @selection-change="selectiontab">
      <el-table-column type="selection" label="全选" width="50" />
      <el-table-column label="序号" type="index" width="80" />
      <el-table-column label="桥梁名称" prop="bridgeName" min-width="80" />
      <el-table-column label="中心里程" prop="centreMileageStr" min-width="80" />
      <el-table-column label="起止里程" prop="startingMileageStr" min-width="200">
          <template #default="scope">
            <span>{{ scope.row.startingMileageStr + "~" +  scope.row.destinationMileageStr}}</span>
          </template>
        </el-table-column>
      <el-table-column label="上下行" prop="lineType" min-width="80" />
      <el-table-column label="孔跨" prop="holeSpan" min-width="80" />
      <el-table-column label="式样" prop="styleName" min-width="80" />
      <el-table-column label="全长m" prop="overallLength" min-width="80" />
      <el-table-column label="桥长m" prop="bridgeLength" min-width="80" />
      <el-table-column label="坡度(‰)" prop="slope" min-width="80" />
      <el-table-column label="曲线半径(m)" prop="curveRadius" min-width="80" />
      <el-table-column label="建成年限" prop="completionPeriod" min-width="80" />
      <el-table-column label="墩台式样" prop="abutmentStyleName" min-width="80" />
      <el-table-column label="基础类型" prop="underlyingType" min-width="80" />
      <el-table-column label="支座类型" prop="adminiculaTypeName" min-width="80" />
      <el-table-column label="病害整治情况" prop="diseaseControlSituation" min-width="80" />
      <el-table-column label="病害整治年份" prop="yearOfDiseaseControl" min-width="80" />
      <el-table-column label="桥梁类型" prop="sortByLength" min-width="80" />
      <el-table-column label="直接数据" min-width="110">
        <template #default="scope">
          <div class="buttontext">
            <el-button link type="primary" @click="parameter(scope.row)">参数</el-button>
            <el-button link type="primary" @click="meansFun(scope.row)">资料</el-button>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="关联数据" min-width="210">
        <template #default="scope">
          <div class="buttontext">
            <el-button link type="primary" @click="resumeUpdate(scope.row)">作业履历</el-button>
            <el-button link type="primary" @click="deviceProblem(scope.row)">设备问题</el-button>
            <el-button link type="primary" @click="businessFinance(scope.row)">业财</el-button>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="操作" min-width="80">
        <template #default="scope">
          <div class="buttontext">
            <el-button link type="primary" @click="handDelete(scope.row.id)">删除</el-button>
          </div>
        </template>
      </el-table-column>
    </el-table>
    <!-- 添加或修改用户配置对话框 -->
    <el-dialog :title="title" v-model="open" width="1300px" append-to-body>
      <el-form ref="userRef" :model="form" :rules="rules" label-width="80px" :inline="true">
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">位置</span>
          <span class="rightx"></span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="单位名称" prop="unitId">
              <el-select filterable clearable style="width: 180px" v-model="form.unitId" placeholder="请选择">
                <el-option v-for="dict in unitNameobj" :key="dict.id" :label="dict.unitName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="线名" prop="railwayId">
              <el-select filterable clearable style="width: 180px" v-model="form.railwayId" placeholder="请选择">
                <el-option v-for="dict in railwayNameobj" :key="dict.id" :label="dict.railwayName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="上下行" prop="lineTypeId">
              <el-select filterable clearable style="width: 180px" v-model="form.lineTypeId" placeholder="请选择">
                <el-option v-for="dict in progressTypeobj" :key="dict.id" :label="dict.progressType" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="中心里程" prop="centreMileage">
              <el-input type="number" v-model="form.centreMileage" placeholder="请输入起点里程" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="起点里程" prop="startingMileage">
              <el-input type="number" v-model="form.startingMileage" placeholder="请输入起点里程" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="终点里程" prop="destinationMileage">
              <el-input type="number" v-model="form.destinationMileage" placeholder="请输入终点里程" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥位置补充描述" prop="bridgeLocationAddedDescription">
              <el-input v-model="form.bridgeLocationAddedDescription" type="textarea" placeholder="请输入桥位置补充描述" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="桥号" prop="bridgeId"> <el-input v-model="form.bridgeId" placeholder="请输入桥号" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="桥名" prop="bridgeName">
              <el-input v-model="form.bridgeName" placeholder="请输入桥名" />
            </el-form-item>
          </el-col>
        </el-row>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">特性</span>
          <span class="rightx"></span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="开工日期" prop="commencementDate">
              <el-date-picker
                style="width: 180px"
                format="YYYY/MM/DD"
                value-format="YYYY/MM/DD"
                v-model="form.commencementDate"
                type="datetime"
                placeholder="请选择开工日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="竣工日期" prop="completedDate">
              <el-date-picker
                style="width: 180px"
                format="YYYY/MM/DD"
                value-format="YYYY/MM/DD"
                v-model="form.completedDate"
                type="datetime"
                placeholder="请选择竣工日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="桥梁类型" prop="sortByLength">
              <el-input v-model="form.sortByLength" placeholder="请输入桥梁类型" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="按粱拱材质分类" prop="classificationByArchMaterial">
              <el-input v-model="form.classificationByArchMaterial" placeholder="请输入按粱拱材质分类" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="按桥面位置分类" prop="classificationByDeckPosition">
              <el-input v-model="form.classificationByDeckPosition" placeholder="请输入按桥面位置分类" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="按桥跨结构分类" prop="classificationByBridgeSpanStructure">
              <el-input v-model="form.classificationByBridgeSpanStructure" placeholder="请输入按桥跨结构分类" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="按截面形式分类" prop="classificationBySectionalForm">
              <el-input v-model="form.classificationBySectionalForm" placeholder="请输入按截面形式分类" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="跨越道路及河流" prop="acrossRoadsAndRivers">
              <el-input v-model="form.acrossRoadsAndRivers" placeholder="请输入跨越道路及河流" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="设备结构" prop="facilityStructureId">
              <el-select filterable clearable style="width: 180px" v-model="form.facilityStructureId" placeholder="请选择设备结构">
                <el-option v-for="dict in deviceList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="孔跨" prop="holeSpan"> <el-input v-model="form.holeSpan" placeholder="请输入孔跨" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="式样" prop="styleId">
              <el-select filterable clearable style="width: 180px" v-model="form.styleId" placeholder="请选择样式">
                <el-option v-for="dict in styleList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="全长m" prop="overallLength">
              <el-input v-model="form.overallLength" placeholder="请输入全长" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥长m" prop="bridgeLength"> <el-input v-model="form.bridgeLength" placeholder="请输入桥长" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="墩台式样" prop="abutmentStyleId">
              <el-select filterable clearable style="width: 180px" v-model="form.abutmentStyleId" placeholder="请选择">
                <el-option v-for="dict in abutmentStyleIdList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="基础类型" prop="underlyingType">
              <el-select filterable clearable style="width: 180px" v-model="form.underlyingId" placeholder="请选择">
                <el-option v-for="dict in underlyingTypeList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="支座类型" prop="adminiculaTypeId">
              <el-select filterable clearable style="width: 180px" v-model="form.adminiculaTypeId" placeholder="请选择">
                <el-option v-for="dict in adminiculaTypeIdList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="轨道类型" prop="orbitTypeId">
              <el-select filterable clearable style="width: 180px" v-model="form.orbitTypeId" placeholder="请选择轨道类型">
                <el-option v-for="dict in railFlangeHighList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="轨底高" prop="railFlangeHigh">
              <el-input type="number" v-model="form.railFlangeHigh" placeholder="请输入轨底高" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥枕根数" prop="bridgeTieNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.bridgeTieNum" placeholder="请输入桥枕根数" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="线间距" prop="lineInterval">
              <el-input type="number" v-model="form.lineInterval" placeholder="请输入线间距" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="跨越位置" prop="astrideLocation">
              <el-input v-model="form.astrideLocation" placeholder="请输入跨越位置" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="是否采取安全防护措施" prop="whetherSafetyProtectionMeasure">
              <el-input v-model="form.whetherSafetyProtectionMeasure" placeholder="请输入是否采取安全防护措施" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="具体措施" prop="concreteMeasure">
              <el-input v-model="form.concreteMeasure" placeholder="请输入具体措施" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="建设单位" prop="constructionUnit">
              <el-input v-model="form.constructionUnit" placeholder="请输入建设单位" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="设计单位" prop="designUnit"> <el-input v-model="form.designUnit" placeholder="请输入设计单位" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="监理单位" prop="supervisorUnit">
              <el-input v-model="form.supervisorUnit" placeholder="请输入监理单位" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="施工单位" prop="buildUnit">
              <el-input v-model="form.buildUnit" placeholder="请输入施工单位" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="设计荷载" prop="designLoad"> <el-input v-model="form.designLoad" placeholder="请输入设计荷载" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="抗震烈度" prop="antiSeismicCapacity">
              <el-input v-model="form.antiSeismicCapacity" placeholder="请输入抗震烈度" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="正斜交角" prop="positiveObliqueAngle">
              <el-input v-model="form.positiveObliqueAngle" placeholder="请输入正斜交角" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥梁跨数" prop="bridgeSpanNum">
              <el-input type="number" v-model="form.bridgeSpanNum" placeholder="请输入桥梁跨度" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="跨径组合" prop="spanCombination">
              <el-input v-model="form.spanCombination" placeholder="请输入跨径组合" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="桥面面积" prop="bridgeFloorArea">
              <el-input type="number" v-model="form.bridgeFloorArea" placeholder="请输入桥面面积" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥梁总宽" prop="totalWidthOfBridge">
              <el-input type="number" v-model="form.totalWidthOfBridge" placeholder="请输入桥梁总宽" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="道路等级" prop="roadGrade"> <el-input v-model="form.roadGrade" placeholder="请输入道路等级" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="设计河床标高" prop="designTheRiverbedElevation">
              <el-input type="number" v-model="form.designTheRiverbedElevation" placeholder="请输入设计河床标高" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="最高水位" prop="highestWaterLevel">
              <el-input type="number" v-model="form.highestWaterLevel" placeholder="请输入最高水位" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="主梁数量" prop="kingpostNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.kingpostNum" placeholder="请输入主梁数里" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="支座数量" prop="supportNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.supportNum" placeholder="请输入支座数里" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥面结构" prop="deckStructure"> <el-input v-model="form.deckStructure" placeholder="请输入桥面结构" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="伸缩缝形式" prop="expansionJointFormId">
              <el-select filterable clearable style="width: 180px" v-model="form.expansionJointFormId" placeholder="请选择伸缩缝形式">
                <el-option v-for="dict in expansionJointList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="伸缩缝数量" prop="expansionJointNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.expansionJointNum" placeholder="请输入伸缩缝数量" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="桥面设计标高" prop="bridgeDeckDesignElevation">
              <el-input v-model="form.bridgeDeckDesignElevation" placeholder="请输入桥面设计标高" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="主桥纵坡" prop="mainBridgeLongitudinalSlope">
              <el-input v-model="form.mainBridgeLongitudinalSlope" placeholder="请输入主桥纵坡" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="主桥横坡" prop="mainBridgeCrossSlope">
              <el-input v-model="form.mainBridgeCrossSlope" placeholder="请输入主桥横坡" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="引桥纵坡" prop="approachBridgeLongitudinalSlope">
              <el-input v-model="form.approachBridgeLongitudinalSlope" placeholder="请输入引桥纵坡" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="拱桥矢跨比" prop="spanRatioOfArchBridge">
              <el-input v-model="form.spanRatioOfArchBridge" placeholder="请输入拱桥矢跨比" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="总造价" prop="overallCost">
              <el-input v-model="form.overallCost" placeholder="请输入总造价" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="栏杆总长" prop="lengthOfRailing">
              <el-input type="number" v-model="form.lengthOfRailing" placeholder="请输入栏杆总长" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="栏杆结构" prop="railingStructure">
              <el-input v-model="form.railingStructure" placeholder="请输入栏杆结构" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="端柱尺寸" prop="endColumnDimension">
              <el-input v-model="form.endColumnDimension" placeholder="请输入端柱尺寸" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="护岸类型" prop="revetmentTypeId">
              <el-select filterable clearable style="width: 180px" v-model="form.revetmentTypeId" placeholder="请选择伸缩缝形式">
                <el-option v-for="dict in revetmentTypeList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="引坡挡墙类型" prop="leadingSlopeRetainingWallType">
              <el-input v-model="form.leadingSlopeRetainingWallType" placeholder="请输入端柱尺寸" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="基桩根数" prop="foundationPilesNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.foundationPilesNum" placeholder="请输入基桩根数" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="挡土板厚度" prop="thicknessOfRetainingPlate">
              <el-input v-model="form.thicknessOfRetainingPlate" placeholder="请输入挡土板厚度" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="翼墙形式" prop="wingWallForm"> <el-input v-model="form.wingWallForm" placeholder="请输入翼墙形式" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="翼墙长度" prop="wingWallLength">
              <el-input v-model="form.wingWallLength" placeholder="请输入翼墙长度" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="给水管数量" prop="servicePipeNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.servicePipeNum" placeholder="请输入给水管数量" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="燃气管数量" prop="gasPipeNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.gasPipeNum" placeholder="请输入燃气管数里" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="电力缆数量" prop="powerCableNum">
              <el-input-number precision="0" step="1" min="0" v-model="form.powerCableNum" placeholder="请输入电力缆数量" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="通讯电缆数量" prop="communicationCableNum">
              <el-input v-model="form.communicationCableNum" placeholder="请输入通讯电缆数里" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="建成年限" prop="completionPeriod">
              <el-date-picker
                style="width: 180px"
                format="YYYY/MM/DD"
                value-format="YYYY/MM/DD"
                v-model="form.completionPeriod"
                type="datetime"
                placeholder="请选择建成年限"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="挡碴墙间距" prop="ballastWallSpacing">
              <el-input type="number" v-model="form.ballastWallSpacing" placeholder="请输入挡碴墙间距" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="人行道类型" prop="sidewalkTypeId">
              <el-select filterable clearable style="width: 180px" v-model="form.sidewalkTypeId" placeholder="请选择人行道类型">
                <el-option v-for="dict in sidewalkList" :key="dict.id" :label="dict.propertyName" :value="dict.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">相关特性</span>
          <span class="rightx"></span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="护轨类型" prop="guardTypeId">
              <el-input disabled v-model="form.guardTypeId" placeholder="请输入护轨长度" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="护轨长度" prop="guardLength">
              <el-input disabled v-model="form.guardLength" placeholder="请输入护轨长度" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="坡度(‰)" prop="slope">
              <el-input disabled v-model="form.slope" placeholder="请输入坡度（‰）" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="曲线半径(m)" prop="curveRadius">
              <el-input disabled v-model="form.curveRadius" placeholder="请输入曲线半径(m)" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="曲线长" prop="curveLength">
              <el-input disabled v-model="form.curveLength" placeholder="请输入曲线长" />
            </el-form-item>
          </el-col>
        </el-row>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">健康值</span>
          <span class="rightx"></span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="健康值" prop="healthIndex"> <el-input v-model="form.healthIndex" placeholder="请输入健康值" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="隐患等级" prop="hiddenDangerLevel">
              <el-input v-model="form.hiddenDangerLevel" placeholder="请输入隐患等级" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="存在问题" prop="existingProblem">
              <el-input v-model="form.existingProblem" placeholder="请输入存在问题" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="病害整治情况" prop="diseaseControlSituation">
              <el-input v-model="form.diseaseControlSituation" placeholder="请输入病害整治情况" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="病害整治年份" prop="yearOfDiseaseControl">
              <el-input v-model="form.yearOfDiseaseControl" placeholder="请输入病害整治年份" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="设备使用频率" prop="equipmentUsageFrequency">
              <el-input v-model="form.equipmentUsageFrequency" placeholder="请输入设备使用频率" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="设备综合效率(OEE)" prop="overallEquipmentEfficiency">
              <el-input v-model="form.overallEquipmentEfficiency" placeholder="请输入设备综合效率(OEE)" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="平均无故障工作时间(MTTF)" prop="meanTimeToFailure">
              <el-input v-model="form.meanTimeToFailure" placeholder="请输入平均无故障工作时间(MTTF)" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="平均修复时间(MTTR)" prop="meanTimeToRepair">
              <el-input v-model="form.meanTimeToRepair" placeholder="请输入平均修复时间(MTTR)" />
            </el-form-item>
          </el-col>
        </el-row>
        <div class="divflex">
          <span class="leftx"></span>
          <span class="mainz">管理</span>
          <span class="rightx"></span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="区段" prop="sector"> <el-input v-model="form.sector" placeholder="请输入区段" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="工区" prop="workArea"> <el-input v-model="form.workArea" placeholder="请输入工区" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="人员" prop="personnel">
              <el-input v-model="form.personnel" placeholder="请输入人员" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="包保责任人" prop="personInCharge">
              <el-input v-model="form.personInCharge" placeholder="请输入包保责任人" /> </el-form-item
          ></el-col>
          <el-col :span="8">
            <el-form-item label="备注" prop="comment">
              <el-input v-model="form.comment" type="textarea" placeholder="请输入内容" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div class="divflex" v-if="parameterShow">
        <span class="leftx"></span>
        <span class="mainz">修改历史</span>
        <span class="rightx"></span>
      </div>
      <el-table :data="allBridgeChangeData" border height="300px" v-if="parameterShow">
        <el-table-column label="序号" type="index" width="80" />
        <el-table-column label="指标名" prop="property" min-width="80"></el-table-column>
        <el-table-column label="变更前指标值" prop="oldValue" min-width="80"></el-table-column>
        <el-table-column label="变更后指标值" prop="newValue" min-width="80"></el-table-column>
        <el-table-column label="变更时间" prop="createTime" min-width="80"></el-table-column>
        <el-table-column label="操作用户名" prop="user" min-width="80"></el-table-column>
      </el-table>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
    <el-dialog title="设备问题" v-model="equipmentproblemShow" width="1200px" append-to-body>
      <p>故障</p>
      <div>
        <el-form :model="faultForm" ref="queryRef" :inline="true">
          <el-form-item label="故障时间">
            <el-select v-model="faultForm.lineId" placeholder="线名" clearable style="width: 140px">
              <el-option v-for="dict in railwayNameobj" :key="dict.railwayName" :label="dict.railwayName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary" @click="faultSeek" style="width: 90px">查找</el-button>
            <el-button @click="faultClear" style="width: 90px">清空</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="" style="width: 90px">新增</el-button>
          </el-form-item>
        </el-form>
        <el-table :data="faultForm.tabledata" height="57vh" border>
          <el-table-column type="selection" label="全选" width="50" />
          <el-table-column label="故障编码" type="index" width="80" />
          <el-table-column label="故障描述" prop="railwayName" min-width="80" />
          <el-table-column label="故障类别" prop="lineType" min-width="80" />
          <el-table-column label="故障时间" prop="centreMileage" min-width="80" />
          <el-table-column label="处理状态" prop="startingMileage" min-width="80" />
          <el-table-column label="维修方案" prop="destinationMileage" min-width="80"></el-table-column>
          <el-table-column label="维修日期" prop="bridgeId" min-width="80"></el-table-column>
          <el-table-column label="作业流程" prop="bridgeName" min-width="80"></el-table-column>
          <el-table-column label="维修负责人" prop="bridgeSpanNum" min-width="80"></el-table-column>
          <el-table-column label="故障处理耗时" prop="kingpostNum" min-width="80"></el-table-column>
          <el-table-column label="故障来源" prop="supportNum" min-width="80"></el-table-column>
          <el-table-column label="上报用户" prop="foundationPilesNum" min-width="80"></el-table-column>
          <el-table-column label="操作" min-width="100">
            <template #default="scope">
              <div class="buttontext">
                <el-button link type="primary" icon="el-icon-edit">修改</el-button>
                <el-button link type="primary">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <p>超限</p>
      <div>
        <el-form :model="faultForm" ref="queryRef" :inline="true">
          <el-form-item label="更新时间">
            <el-select v-model="faultForm.lineId" placeholder="线名" clearable style="width: 140px">
              <el-option v-for="dict in railwayNameobj" :key="dict.railwayName" :label="dict.railwayName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary" @click="faultSeek" style="width: 90px">查找</el-button>
            <el-button @click="faultClear" style="width: 90px">清空</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="" style="width: 90px">新增</el-button>
          </el-form-item>
        </el-form>
        <el-table :data="railList" height="57vh" border>
          <el-table-column type="selection" label="全选" width="50" />
          <el-table-column label="序号" type="index" width="80" />
          <el-table-column label="标示位置-公里" prop="railwayName" min-width="80" />
          <el-table-column label="标示位置-米" prop="lineType" min-width="80" />
          <el-table-column label="线路特征" prop="centreMileage" min-width="80" />
          <el-table-column label="处理结果" prop="startingMileage" min-width="80" />
          <el-table-column label="处理时间" prop="destinationMileage" min-width="80"></el-table-column>
          <el-table-column label="天窗命令号" prop="bridgeId" min-width="80"></el-table-column>
          <el-table-column label="负责人" prop="bridgeName" min-width="80"></el-table-column>
          <el-table-column label="操作" min-width="100">
            <template #default="scope">
              <div class="buttontext">
                <el-button link type="primary" icon="el-icon-edit">修改</el-button>
                <el-button link type="primary">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <p>告警</p>
      <div>
        <el-form :model="faultForm" ref="queryRef" :inline="true">
          <el-form-item label="报警时间">
            <el-select v-model="faultForm.lineId" placeholder="线名" clearable style="width: 140px">
              <el-option v-for="dict in railwayNameobj" :key="dict.railwayName" :label="dict.railwayName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary" @click="faultSeek" style="width: 90px">查找</el-button>
            <el-button @click="faultClear" style="width: 90px">清空</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="" style="width: 90px">新增</el-button>
          </el-form-item>
        </el-form>
        <el-table :data="railList" height="57vh" border>
          <el-table-column type="selection" label="全选" width="50" />
          <el-table-column label="报警序号" type="index" width="80" />
          <el-table-column label="标示位置-公里" prop="railwayName" min-width="80" />
          <el-table-column label="标示位置-米" prop="lineType" min-width="80" />
          <el-table-column label="线路特征" prop="centreMileage" min-width="80" />
          <el-table-column label="处理结果" prop="startingMileage" min-width="80" />
          <el-table-column label="处理时间" prop="destinationMileage" min-width="80"></el-table-column>
          <el-table-column label="天窗命令号" prop="bridgeId" min-width="80"></el-table-column>
          <el-table-column label="负责人" prop="bridgeName" min-width="80"></el-table-column>
          <el-table-column label="操作" min-width="100">
            <template #default="scope">
              <div class="buttontext">
                <el-button link type="primary" icon="el-icon-edit">修改</el-button>
                <el-button link type="primary">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <p>在线监测/控制</p>
    </el-dialog>
    <el-dialog title="业财" v-model="businessFinanceShow" width="1200px" append-to-body>
      <p>
        <span>经济投入</span>
        <el-button link type="primary" @click="addEconomyTableData(scope.row.id)">新增物资</el-button>
      </p>
      <el-table :data="economyTableData" height="300px" border>
        <el-table-column label="编号" type="index" width="80" />
        <el-table-column label="物资名称" prop="railwayName" />
        <el-table-column label="物资类型" prop="lineType" />
        <el-table-column label="物资单价" prop="centreMileage" />
        <el-table-column label="采购数量" prop="startingMileage" />
        <el-table-column label="采购总价" prop="destinationMileage" />
      </el-table>
      <p>
        <span>财务台账</span>
        <el-button link type="primary" @click="handDeletez(scope.row.id)">新增物资</el-button>
      </p>
      <el-table :data="ledgerTabledata" height="300px" border>
        <el-table-column label="编号" type="index" width="80" />
        <el-table-column label="物资名称" prop="railwayName" />
        <el-table-column label="物资类型" prop="lineType" />
        <el-table-column label="物资单价" prop="centreMileage" />
        <el-table-column label="库存数量" prop="startingMileage" />
        <el-table-column label="库存总价" prop="destinationMileage" />
        <el-table-column label="消耗标准" prop="centreMileage" />
        <el-table-column label="实际消耗量" prop="startingMileage" />
        <el-table-column label="消耗总价" prop="destinationMileage" />
      </el-table>
    </el-dialog>
    <el-dialog draggable title="资料" v-model="meansopen" width="1300px" append-to-body @close="closefun">
      <means :forma="formam" parentName="全桥" v-if="meansopen"></means>
    </el-dialog>
  </div>
</template>

<script setup name="Bridge">
import {
  listBridgeRailapi,
  addallBridgeApi,
  updateAllBridgeApi,
  delAllBridgeDataApi,
  getSelectManBridgeEditRecordListApi,
  getselectManBridgeFullBridgeInformationById,
  getSelectListApi,
} from "@/api/main/bridge.js";
import { selectManBasicUnitListapi, selectManBasicRailwayListapi, selectManBasicprogressTypeListapi } from "@/api/main/api.js";
import { useContent } from "@/mixin/index.js";
const { meansopen, meansFun, formam, closefun, resumeUpdate, deviceProblem, businessFinance } = useContent();
import means from "@/components/railmodle/means.vue";
import { reactive, ref, toRefs } from "vue";
const { proxy } = getCurrentInstance();
const title = ref("新增");
const loading = ref(true);
const open = ref(false);
const equipmentproblemShow = ref(false);
const businessFinanceShow = ref(false);

const parameterShow = ref(false);

defineExpose({ getList });
const emit = defineEmits(["parentCount"]);

const data = reactive({
  faultForm: {
    lineId: "",
    tabledata: [],
  },
  railList: [],
  selecttabList: [],
  //单位名称列表数据
  unitNameobj: [],
  //线名数据列表
  railwayNameobj: [],
  //行别数据列表
  progressTypeobj: [],
  // 护岸类型
  revetmentTypeList: [],
  // 设备结构
  deviceList: [],
  // 式样
  styleList: [],
  // 人行道类型
  sidewalkList: [],
  railFlangeHighList: [],
  // 墩台式样
  abutmentStyleIdList:[],
  // 基础类型
  underlyingTypeList:[],
  // 支座类型
  adminiculaTypeIdList: [],
  // 伸缩缝
  expansionJointList: [],
  form: {},
  queryParams: {
    pageNum: "1",
    pageSize: "10",
    lineId: "",
    startingMileage: "",
    destinationMileage: "",
    bridgeId: "",
  },
  rules: {
    unitId: [{ required: true, message: "单位名称不能为空", trigger: ["blur", "change"] }],
    railwayId: [{ required: true, message: "线名不能为空", trigger: ["blur", "change"] }],
    progressTypeId: [{ required: true, message: "上下行不能为空", trigger: ["blur", "change"] }],
    centreMileage: [{ required: true, message: "中心里程不能为空", trigger: ["blur", "change"] }],
    startingMileage: [{ required: true, message: "起点里程不能为空", trigger: ["blur", "change"] }],
    destinationMileage: [{ required: true, message: "终点里程不能为空", trigger: ["blur", "change"] }],
    bridgeId: [{ required: true, message: "桥别不能为空", trigger: ["blur", "change"] }],
    bridgeName: [{ required: true, message: "桥号不能为空", trigger: ["blur", "change"] }],
    bridgeLength: [{ required: true, message: "桥长不能为空", trigger: ["blur", "change"] }],
    completionPeriod: [{ required: true, message: "建成年限不能为空", trigger: ["blur", "change"] }],
  },
  allBridgeChangeData: [],
  economyTableData: [],
  ledgerTabledata: [],
});

const {
  faultForm,
  queryParams,
  railList,
  selecttabList,
  form,
  rules,
  unitNameobj,
  railwayNameobj,
  progressTypeobj,
  revetmentTypeList,
  deviceList,
  styleList,
  sidewalkList,
  railFlangeHighList,
  abutmentStyleIdList,
  underlyingTypeList,
  adminiculaTypeIdList,
  expansionJointList,
  allBridgeChangeData,
  economyTableData,
  ledgerTabledata,
} = toRefs(data);

const pageNumparent = ref(undefined);
const pageSizeparent = ref(undefined);

function init() {
  getLineDataList();
  getUnitDataList();
  getxbData();
  getsbjgData();
  getsyData();
  getrxdlxData();
  getdtsyData();
  getzzlxData();
  getssflxData();
  getHalxData();
  getList();
}
init();

/** 查询列表 */
function getList(pageNum, pageSize) {
  loading.value = true;
  if (pageNum != undefined || pageSize != undefined) {
    pageNumparent.value = pageNum;
    pageSizeparent.value = pageSize;
    queryParams.value.pageNum = pageNum == undefined ? 1 : pageNum;
    queryParams.value.pageSize = pageSize == undefined ? 10 : pageSize;
  } else {
    queryParams.value.pageNum = pageNumparent.value == undefined ? "1" : pageNumparent.value;
    queryParams.value.pageSize = pageSizeparent.value == undefined ? "10" : pageSizeparent.value;
  }
  listBridgeRailapi({
    pageNum: queryParams.value.pageNum,
    pageSize: queryParams.value.pageSize,
    railwayId: queryParams.value.lineId,
    startingMileage: queryParams.value.startingMileage,
    destinationMileage: queryParams.value.destinationMileage,
    bridgeId: queryParams.value.bridgeId,
  }).then((res) => {
    if (res.code == 200) {
      data.railList = res.data;
    }
    loading.value = false;
    emit("parentCount", res.count);
  });
}
/** 查询基础数据-单位数据列表 */
function getUnitDataList() {
  selectManBasicUnitListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      unitNameobj.value = res.data;
    }
  });
}
/** 查询基础数据-线名数据列表 */
function getLineDataList() {
  selectManBasicRailwayListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      railwayNameobj.value = res.data;
    }
  });
}
/** 查询基础数据-行别数据列表 */
function getxbData() {
  selectManBasicprogressTypeListapi({ hasDelete: 0 }).then((res) => {
    if (res.code == 200) {
      progressTypeobj.value = res.data;
    }
  });
}
/** 查询基础数据-设备结构数据列表 */
function getsbjgData() {
  getSelectListApi({ propertyType: "设备结构" }).then((res) => {
    if (res.code == 200) {
      deviceList.value = res.data;
    }
  });
}
/** 查询基础数据-式样数据列表 */
function getsyData() {
  getSelectListApi({ propertyType: "式样" }).then((res) => {
    if (res.code == 200) {
      styleList.value = res.data;
    }
  });
}
/** 查询基础数据-人行道类型数据列表 */
function getrxdlxData() {
  getSelectListApi({ propertyType: "人行道类型" }).then((res) => {
    if (res.code == 200) {
      sidewalkList.value = res.data;
    }
  });
  getSelectListApi({ propertyType: "轨道类型" }).then((res) => {
    if (res.code == 200) {
      railFlangeHighList.value = res.data;
    }
  });
}
/** 查询-墩台式样数据列表 */
function getdtsyData() {
  getSelectListApi({ propertyType: "墩台式样" }).then((res) => {
    if (res.code == 200) {
      abutmentStyleIdList.value = res.data;
    }
  });
  // 基础类型 underlyingTypeList
  getSelectListApi({ propertyType: "基础类型" }).then((res) => {
    if (res.code == 200) {
      underlyingTypeList.value = res.data;
    }
  });
}
/** 查询-支座类型数据列表 */
function getzzlxData() {
  getSelectListApi({ propertyType: "支座类型" }).then((res) => {
    if (res.code == 200) {
      adminiculaTypeIdList.value = res.data;
    }
  });
}
/** 查询基础数据-护岸类型数据列表 */
function getHalxData() {
  getSelectListApi({ propertyType: "护岸类型" }).then((res) => {
    if (res.code == 200) {
      revetmentTypeList.value = res.data;
    }
  });
}

/** 查询基础数据-伸缩缝形式数据列表 */
function getssflxData() {
  getSelectListApi({ propertyType: "伸缩缝形式" }).then((res) => {
    if (res.code == 200) {
      expansionJointList.value = res.data;
    }
  });
}
/* 删除单行数据 */
function handDelete(row) {
  delAllBridgeDataApi({ id: row }).then((res) => {
    if (res.code == 200) {
      proxy.$modal.msgSuccess("删除成功");
      getList();
    }
  });
}

/** 重置操作表单 */
function reset() {
  form.value = {
    id: "",
    unitId: "",
    railwayName: "",
    railwayId: "",
    centreMileage: "",
    startingMileage: "",
    destinationMileage: "",
    bridgeLocationAddedDescription: "",
    bridgeId: "",
    bridgeName: "",
    commencementDate: "",
    completedDate: "",
    sortByLength: "",
    classificationByArchMaterial: "",
    classificationByDeckPosition: "",
    classificationByBridgeSpanStructure: "",
    classificationBySectionalForm: "",
    acrossRoadsAndRivers: "",
    facilityStructureId: "",
    holeSpan: "",
    styleId: "",
    overallLength: "",
    bridgeLength: "",
    completionPeriod: "",
    ballastWallSpacing: "",
    sidewalkTypeId: "",
    orbitType: "",
    orbitTypeId: "",
    railFlangeHigh: "",
    bridgeTieNum: "",
    lineInterval: "",
    astrideLocation: "",
    whetherSafetyProtectionMeasure: "",
    concreteMeasure: "",
    constructionUnit: "",
    designUnit: "",
    supervisorUnit: "",
    buildUnit: "",
    designLoad: "",
    antiSeismicCapacity: "",
    positiveObliqueAngle: "",
    bridgeSpanNum: "",
    spanCombination: "",
    bridgeFloorArea: "",
    totalWidthOfBridge: "",
    roadGrade: "",
    designTheRiverbedElevation: "",
    highestWaterLevel: "",
    kingpostNum: "",
    supportNum: "",
    deckStructure: "",
    expansionJointFormId: "",
    expansionJointNum: "",
    bridgeDeckDesignElevation: "",
    mainBridgeLongitudinalSlope: "",
    mainBridgeCrossSlope: "",
    approachBridgeLongitudinalSlope: "",
    spanRatioOfArchBridge: "",
    overallCost: "",
    lengthOfRailing: "",
    railingStructure: "",
    endColumnDimension: "",
    revetmentTypeId: "",
    leadingSlopeRetainingWallType: "",
    foundationPilesNum: "",
    thicknessOfRetainingPlate: "",
    wingWallForm: "",
    wingWallLength: "",
    servicePipeNum: "",
    gasPipeNum: "",
    powerCableNum: "",
    communicationCableNum: "",
    guardType: "",
    guardLength: "",
    slope: "",
    curveRadius: "",
    curveLength: "",
    healthIndex: "",
    hiddenDangerLevel: "",
    existingProblem: "",
    diseaseControlSituation: "",
    yearOfDiseaseControl: "",
    equipmentUsageFrequency: "",
    overallEquipmentEfficiency: "",
    meanTimeToFailure: "",
    meanTimeToRepair: "",
    sector: "",
    workArea: "",
    personnel: "",
    personInCharge: "",
    comment: "",
    longitude: "",
    latitude: "",
    hasDelete: "",
    createTime: "",
  };
  proxy.resetForm("userRef");
}
/** 新增按钮操作 */
function handleAdd() {
  reset();
  open.value = true;
  title.value = "新增";
  parameterShow.value = false;
}
/** 提交按钮 */
function submitForm() {
  proxy.$refs["userRef"].validate((valid) => {
    if (valid) {
      unitNameobj.value.forEach((item) => {
        if (form.value.unitId == item.id) {
          form.value.unitName = item.unitName;
        }
      });
      railwayNameobj.value.forEach((item) => {
        if (form.value.railwayId == item.id) {
          form.value.railwayName = item.railwayName;
        }
      });
      progressTypeobj.value.forEach((item) => {
        if (form.value.lineTypeId == item.id) {
          form.value.lineTypeName = item.progressType;
        }
      });
      deviceList.value.forEach((item) => {
        if (form.value.facilityStructureId == item.id) {
          form.value.facilityStructureName = item.propertyName;
        }
      });
      styleList.value.forEach((item) => {
        if (form.value.styleId == item.id) {
          form.value.styleName = item.propertyName;
        }
      });
      sidewalkList.value.forEach((item) => {
        if (form.value.sidewalkTypeId == item.id) {
          form.value.sidewalkTypeName = item.propertyName;
        }
      });
      railFlangeHighList.value.forEach((item) => {
        if (form.value.orbitTypeId == item.id) {
          form.value.orbitTypeName = item.propertyName;
        }
      });
      // 墩台式样
      abutmentStyleIdList.value.forEach((item) => {
        if (form.value.abutmentStyleId == item.id) {
          form.value.abutmentStyleName = item.propertyName;
        }
      });
      underlyingTypeList.value.forEach((item) => {
        if (form.value.underlyingId == item.id) {
          form.value.underlyingType = item.propertyName;
        }
      });
      // 支座类型
      adminiculaTypeIdList.value.forEach((item) => {
        if (form.value.adminiculaTypeId == item.id) {
          form.value.adminiculaTypeName = item.propertyName;
        }
      });
      expansionJointList.value.forEach((item) => {
        if (form.value.expansionJointFormId == item.id) {
          form.value.expansionJointFormName = item.propertyName;
        }
      });
      revetmentTypeList.value.forEach((item) => {
        if (form.value.revetmentTypeId == item.id) {
          form.value.revetmentTypeName = item.propertyName;
        }
      });
      // 里程四舍五入
      form.value.startingMileage = Math.round(form.value.startingMileage * 1000000) / 1000000;
      form.value.destinationMileage = Math.round(form.value.destinationMileage * 1000000) / 1000000;
      form.value.centreMileage = Math.round(form.value.centreMileage * 1000000) / 1000000;
      if (form.value.startingMileage > form.value.destinationMileage) {
        proxy.$modal.msgError(`起始里程应该小于等于终点里程`);
        return false;
      }
      if (form.value.id) {
        updateAllBridgeApi(form.value).then((res) => {
          proxy.$modal.msgSuccess("修改成功");
          open.value = false;
          getList();
        });
      } else {
        addallBridgeApi(form.value).then((res) => {
          proxy.$modal.msgSuccess("新增成功");
          open.value = false;
          getList();
        });
      }
    }
  });
}
/** 取消按钮 */
function cancel() {
  open.value = false;
  reset();
}
function selectiontab(row) {
  selecttabList.value = row;
}
// 导出
function handleQuery() {
  const arrid = [];
  for (let i = 0; i < selecttabList.value.length; i++) {
    arrid.push(selecttabList.value[i].id);
  }
  proxy.download1("/facility-manage/information/exportExcel", arrid, `全桥${new Date().getTime()}.xlsx`);
}
//重置
function resetQuery() {
  queryParams.value = {
    lineId: "",
    startingMileage: "",
    destinationMileage: "",
    bridgeId: "",
  };
  getList();
}
// 查看参数
function parameter(rows) {
  getselectManBridgeFullBridgeInformationById({
    id: rows.id,
  }).then((res) => {
    form.value = res.data;
    getSelectManBridgeEditRecordListApi({
      bridgeId: rows.id,
    }).then((res1) => {
      allBridgeChangeData.value = res1.data;
      title.value = "参数";
      open.value = true;
      parameterShow.value = true;
    });
  });
}
// // 设备
// function equipmentproblem() {
//   equipmentproblemShow.value = true;
// }
// // 业财
// function businessFinance() {
//   businessFinanceShow.value = true;
// }
</script>

<style scoped lang="scss">
.divflex {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .leftx {
    width: 45%;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e8e8e8;
    margin-top: 3px;
  }

  .mainz {
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 24px;
  }

  .rightx {
    width: 45%;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e8e8e8;
    margin-top: 3px;
  }
}

.buttontext {
  .el-button:hover {
    // text-decoration: line-through !important;
  }
}

.el-form--inline .el-form-item.formitemcla {
  margin-right: 5px !important;
}
</style>
